
The Box-Cox transformation applied to ratios of components.
bc(x, lambda)
A matrix with the compositional data. The first component must be zero values free.
The value of the power transformation, it has to be between -1 and 1. If zero values are present it has to
be greater than 0. If alr
) is applied.
A matrix with the transformed data.
The Box-Cox transformation applied to ratios of components, as described in Aitchison (1986) is applied.
Aitchison J. (1986). The statistical analysis of compositional data. Chapman & Hall.
# NOT RUN {
library(MASS)
x <- as.matrix(fgl[, 2:9])
x <- x / rowSums(x)
y1 <- bc(x, 0.2)
y2 <- bc(x, 0)
rbind( colMeans(y1), colMeans(y2) )
rowSums(y1)
rowSums(y2)
# }
Run the code above in your browser using DataLab